import request from '@/utils/request'

// 获取分组列表
export function getGroups() {
  return request({
    url: '/groups',
    method: 'get'
  })
}

// 创建分组
export function createGroup(data) {
  return request({
    url: '/group',
    method: 'post',
    data
  })
}

// 删除分组
export function deleteGroup(groupId) {
  return request({
    url: `/group/${groupId}`,
    method: 'delete'
  })
}

// 更新分组
export function updateGroup(groupId, data) {
  return request({
    url: `/group/${groupId}`,
    method: 'put',
    data
  })
}
